package main

import (
	"syscall/js"
)

func main() {
	cb := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		return js.Global().Get("console").Call("log", "Hello, WebAssembly!")
	})
	defer cb.Release()
	js.Global().Set("sayHello", cb)
	select {}
}